home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nejlepší hry
/
Nejlepsi hry.iso
/
hry
/
sea of chaos
/
sea_install.msi
/
_15C39AAA7726369D39812BD40F01CF6A
/
_B6EE793CEFB048528E9F5E84AA076462
< prev
next >
Wrap
Text File
|
2005-03-23
|
588b
|
26 lines
//simple shader to clip any pixels with a Z coordinate below the water plane
//does not apply lights
//applies vertex diffuse colors and texture sampling
//clips anything below a specified z
//must be used with clipZ2_ps1.vsh
//Luke Lenhart
//(C)2004-2005 Digipen Institute of Technology
//base texture
sampler2D sampTex;
//shader input
struct PS_INPUT
{
float PosZ : TEXCOORD1;
float2 Tex0 : TEXCOORD0;
float4 Clr : COLOR0;
};
//shader
float4 PShader(PS_INPUT In) : COLOR
{
if (In.PosZ<0.5f) In.Clr.a=0;
return In.Clr*tex2D(sampTex,In.Tex0);
};